/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables for Easy Theming */
/* :root {
    --primary-color: #007BFF;
    --secondary-color: #6C757D;
    --background-color: #F8F9FA;
    --nav-bg-color: #2c3e50;
    /* Navigation background */
/* --text-color: #343A40;
    --font-family: 'Montserrat', sans-serif;
} */

/* Root Variables for Easy Theming */
:root {
    --primary-color: #007BFF;
    /* Blue */
    --secondary-color: #6C757D;
    /* Grey */
    --accent-color: #FFD700;
    /* Gold/Yellow for highlights */
    --background-color: #F8F9FA;
    /* Light Grey */
    --text-color: #343A40;
    /* Dark Grey */
    /* --header-bg-color: #2c3e50; Darker blue-grey for header */
    --nav-bg-color: #2c3e50;
    /* Navigation background */
    --footer-bg-color: #2c3e50;
    /*Footer background */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    /* Added Open Sans for body text */
    /* --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 8px 20px rgba(0, 0, 0, 0.2); */
}

/* Body Styles */
body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* Header Section */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.header-top {
    display: flex;
    align-items: center;
    /* Aligns items vertically in the center */
    justify-content: space-between;
    /* Distributes space evenly between items */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo,
.iitr-logo {
    width: 100px;
    /* Adjust logo sizes */
    cursor: pointer;
    height: auto;
    /* Maintain aspect ratio */
    transition: transform 0.3s ease;
    /* Smooth hover effect */
}

.logo:hover,
.iitr-logo:hover {
    transform: scale(1.05);
    /* Slightly enlarge on hover */
}

.lab-name {
    font-family: var(--font-heading);
    font-size: 3.2em;
    /* Prominent font size */
    font-weight: 700;
    /* Bold */
    color: #fff;
    flex-grow: 1;
    text-align: center;
    letter-spacing: 1px;
    /* Add slight letter spacing */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    /* Subtle text shadow */
}

/* .header-full-form {
    font-size: 2em;
    color: #ddd;
    margin-top: 10px;
} */

.header-full-form {
    font-family: var(--font-body);
    font-size: 1.8em;
    /* Reduced font size for differentiation */
    color: rgba(255, 255, 255, 0.8);
    /* Lighter shade of white */
    margin-top: 10px;
    padding: 0 20px;
    /* Add horizontal padding */
}

/* Navigation Menu */
/* General Navigation Styles */
/* Sticky Navigation Bar */
/* Navigation Menu */

.sticky-nav .nav-links a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    /* 400 = normal, 500/600 = slightly bold */
    font-size: 1rem;
    /* adjust size if needed */
    letter-spacing: 0.3px;
    /* optional: subtle spacing */
}

.sticky-nav {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg-color);
    padding: 15px 20px;
    /* Adjusted padding */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    transition: margin-top 0.3s ease;
    /* Smooth transition for margin-top */
}

.sticky-logo {
    width: 150px;
    /* Adjusted size */
    height: auto;
    display: none;
    position: absolute;
    left: 50px;
    /* Adjusted position */
    transition: opacity 0.3s ease;
}

/* New icon classes only — keeps your existing nav styles intact */
/* publications.html — page-specific overrides (place AFTER your main styles.css) */

/* Show the sticky-logo on desktop for Publications page only */
.pubs-nav .sticky-logo {
    display: block !important;
    /* overrides global 'display:none' */
    position: absolute;
    left: 50px;
    width: 150px;
    /* same “good” size as index.html desktop */
    height: auto;
    transition: opacity 0.3s ease;
}

/* Adjust for slightly smaller desktops */
@media (max-width: 1600px) {
    .pubs-nav .sticky-logo {
        left: 20px;
        width: 120px;
    }
}

/* Hide logo on tablets/phones (match your index.html behavior) */
@media (max-width: 1200px) {
    .pubs-nav .sticky-logo {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .pubs-nav .sticky-logo {
        display: none !important;
    }
}

/* Ensure links stay on the right (works with your existing rules) */
#navigation-bar.sticky-nav {
    display: flex;
    align-items: center;
}

#navigation-bar .nav-links {
    margin-left: auto;
}

/* Make sure links sit on the right when using the old classes */
#navigation-bar.sticky-nav {
    display: flex;
    align-items: center;
}

#navigation-bar .nav-links {
    margin-left: auto;
}

/* (Optional) spacing on desktop */
@media (min-width: 901px) {
    #navigation-bar .nav-links {
        display: flex;
        gap: 18px;
    }
}



.sticky-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    /* Reduced gap for more items */
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-grow: 1;
}

.sticky-nav .nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    /* Added transform for hover */
    position: relative;
    /* For underline effect */
}

.sticky-nav .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease-out;
}

.sticky-nav .nav-links a:hover::after {
    width: 100%;
}

.sticky-nav .nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    /* Subtle lift on hover */
}

/* Mobile Navigation */
.menu-icon {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #fff;
    position: absolute;
    right: 20px;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.nav-links {
    transition: none;
    /* Avoid animations on smaller screens */
}

/* Fix sticky logo on smaller laptop screens */
/* @media (max-width: 1600px) { */

/* Target smaller laptop screens */
/* .sticky-logo {
        display: none !important;
        /* Hide sticky logo on smaller screens */
/* } */
*/
/* } */

@media (max-width: 1600px) {
    .sticky-logo {
        left: 20px;
        /* Adjust position for smaller screens */
        width: 120px;
        /* Smaller logo */
    }
}

@media (max-width: 1024px) {

    /* Adjust breakpoint for tablet/smaller laptop */
    .sticky-logo {
        display: none !important;
        /* Hide sticky logo on smaller screens */
    }
}


@media (max-width: 1200px) {
    .sticky-logo {
        display: none !important;
        /* Hide sticky logo on smaller screens */
    }
}




.internship-banner {
    width: 100%;
    background-color: #fef6f6;
    /* Soft rose background */
    color: #5a1e1e;
    /* Elegant maroon-brown text */
    padding: 10px 0;
    border-bottom: 1px solid #f0caca;
    overflow: hidden;
    z-index: 10;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15.5px;
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 18s linear infinite;
    padding-left: 100%;
    font-weight: 500;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    /* .sticky-logo { */
    /* display: none !important; */
    /* Hide sticky logo on smaller screens */
    /* } */

    .menu-icon {
        display: block;
    }

    .sticky-nav {
        justify-content: flex-end;
        /* Push menu icon to right */
        padding-right: 60px;
        /* Space for icon */
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -200px;
        height: 100%;
        width: 200px;
        background-color: #333;
        flex-direction: column;
        align-items: center;
        padding-top: 60px;
        box-shadow: -4px 0 6px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transition: right 0.3s ease;
    }

    .nav-links.show {
        right: 0;
    }

    .nav-overlay.show {
        display: block;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-links a {
        color: #fff;
        font-size: 1.2em;
        display: block;
        /* Make links block-level for full width click */
        padding: 10px 0;
        /* Padding for clickable area */
    }

    .sticky-nav .nav-links a::after {
        /* Hide underline on mobile menu */
        display: none;
    }


}





/* Slideshow Section */
.slideshow-container {
    position: relative;
    max-width: 1000px;
    height: 550px;
    /* Fixed height for consistency */
    margin: 25px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
}

.slideshow {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers the area, cropping if necessary */
    opacity: 0;
    /* Start with opacity 0 for fade */
    transition: opacity 1s ease-in-out;
    /* Fade transition */
}

.slide.active {
    display: block;
    opacity: 1;
    /* Fade in */
}

/* Navigation Buttons for Slideshow */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    /* Darker background */
    color: #fff;
    border: none;
    padding: 12px 15px;
    /* Larger buttons */
    cursor: pointer;
    border-radius: 50%;
    font-size: 24px;
    /* Larger icon */
    transition: background-color 0.3s, transform 0.3s;
    z-index: 10;
    /* Ensure buttons are above images */
}

.prev:hover,
.next:hover {
    background-color: var(--primary-color);
    /* Primary color on hover */
    transform: translateY(-50%) scale(1.1);
    /* Subtle scale on hover */
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

/* Slideshow Indicators (Dots) */
.dot-container {
    text-align: center;
    padding: 10px 0;
    position: absolute;
    bottom: 10px;
    width: 100%;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-color);
}


/* Research Team Section */
.research-team {
    font-family: var(--font-heading);
    padding: 30px 20px;
    /* Reduced padding */
    background-color: #f9f9f9;
}

.research-team h2 {
    text-align: center;
    margin-bottom: 40px;
    /* Increased margin below title */
    font-size: 2.2em;
    /* Larger font size */
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Professor Profile */
/* Professor Profile */
.professor-profile {
    font-family: var(--font-heading);
    background-color: #fff;
    border-radius: 12px;
    /* Slightly more rounded corners */
    box-shadow: var(--shadow-medium);
    margin: 0 auto 40px auto;
    /* Centered and increased margin below */
    padding: 30px;
    /* Increased padding */
    text-align: center;
    max-width: 700px;
    /* Increased max-width */
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
    /* Subtle border */
}

.professor-profile:hover {
    transform: scale(1.02);
    /* Subtle scale on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.professor-profile img {
    width: 120px;
    /* Consistent image size */
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.professor-profile h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.professor-profile p {
    color: #555;
    font-size: 1em;
    margin-bottom: 15px;

}

.research-team .social-icons {
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.research-team .social-icons a {
    display: inline-block;
}

.research-team .icon {
    width: 18px;
    /* Further reduced size for better proportion */
    height: 18px;
    transition: transform 0.3s;
}

.research-team .icon:hover {
    transform: scale(1.2);
}

/* Team Members */
.team-container {
    font-family: var(--font-heading);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    /* Reduced gap between team members */
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    font-family: var(--font-heading);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 10px;
    padding: 15px;
    text-align: center;
    flex: 1 1 calc(25% - 40px);
    max-width: 300px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.team-member h3 {
    margin-bottom: 8px;
    color: var(--primary-color);
    margin: 10px 0;
    font-size: 1.2em;
}



.team-member .social-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.team-member .social-icons a {
    display: inline-block;
}

.team-member .icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    /* Ensures image fits box */
    vertical-align: middle;
    transition: transform 0.3s;
}

.team-member .icon:hover {
    transform: scale(1.2);
}


/* Button Style */
.button {

    margin-top: 20px;
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {

    background-color: #0056b3;
}

/* Former Students Section */
#former-students {
    font-family: var(--font-heading);
    padding: 30px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

#former-students h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    color: var(--primary-color);
}

.former-student-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.former-student {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    flex: 1 1 calc(50% - 40px);
    /* Larger width */
    max-width: 500px;
    /* Max width for larger boxes */
    transition: transform 0.3s, box-shadow 0.3s;
}

.former-student:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.former-student img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.student-details h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin: 10px 0;
}

.student-details p {
    font-size: 0.9em;
    color: #555;
    margin: 5px 0;
    text-align: left;
    /* Ensure text aligns left */
}


.former-student .social-icons {
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.former-student .social-icons a {
    display: inline-block;
}

.former-student .icon {
    width: 20px;
    /* Further reduced size for better proportion */
    height: 20px;
    transition: transform 0.3s;
}

.former-student .icon:hover {
    transform: scale(1.2);
}

/* Postdoctoral Staff Heading */
.postdoc-heading {
    text-align: center;
    font-size: 1.2em;
    /* Smaller font size */
    color: #555;
    margin-top: 20px;
    margin-bottom: 20px;
}



/* Projects Section */
.projects {
    font-family: var(--font-heading);
    padding: 30px 20px;
    /* Reduced padding */
    background-color: var(--background-color);
}

.projects h2 {
    text-align: center;
    margin-bottom: 25px;
    /* Reduced margin below title */
    font-size: 1.8em;
    /* Slightly reduced font size */
    color: var(--primary-color);
}

.project-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    /* Reduced gap between projects */
    max-width: 1200px;
    margin: 0 auto;
}

.project-item {
    background-color: #fff;
    padding: 15px;
    /* Reduced padding */
    border-radius: 10px;
    width: 260px;
    /* Adjusted width */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-item h3 {
    margin-bottom: 8px;
    /* Reduced margin below project titles */
    color: var(--primary-color);
}

.project-item p {
    color: var(--text-color);
    font-size: 0.95em;
    /* Slightly reduced font size */
}



/* Button */
.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 10px;
    color: #fff;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-family: var(--font-heading);
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #0056b3;
    /* Darker blue */
    transform: translateY(-3px);
    /* Lift effect */
    box-shadow: var(--shadow-medium);
}



/* Publications Section */
/* Publications Section */
.publication-grid {
    font-family: var(--font-heading);
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.publication-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    transition: all 0.3s ease;
}

.publication-item {
    font-family: var(--font-heading);
    width: 250px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 10px;
    height: 320px;
    /* Set initial height */
    position: relative;
}

/* Style for the image */
.publication-item img {
    width: 100%;
    height: 150px;
    /* Fixed height for images */
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* Style for the publication title */
.publication-title {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 5;
    /* Standard property for line clamping */

    font-weight: bold;
    color: #007bff;
    margin: 10px 0;
    padding: 0 10px;
    white-space: normal;
    transition: all 0.3s ease;
}

/* Remove underlining from links */
.publication-item a {
    text-decoration: none;
    color: inherit;
}

/* Hover effect to expand all items in the row */
.publication-row:hover .publication-item {
    height: 360px;
    /* Set max height for expansion on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
    /* Slightly scales up the item */
}

.publication-row:hover .publication-title {
    display: -webkit-box;
    -webkit-line-clamp: unset;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: unset;
    /* Standard property for line clamping */

    overflow: visible;
}


/* Publications Section */
.publications {
    padding: 10px 20px;
    /* background-color: #f0f0f0; */
    /* Light background for this section */
}

.publications h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2em;
    color: var(--primary-color);
    font-family: var(--font-heading);
}


/* Notification Section */
.notifications {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: var(--font-heading);
}

.notifications h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #007bff;
}

.notification-container {
    height: 300px;
    /* Fixed height */
    overflow: hidden;
    position: relative;
}

.notification-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    animation: scroll-loop 10s linear infinite;
    /* smooth loop */
    will-change: transform;
}

/* Each notification */
.notification-item {
    border-top: 1px dashed #cfd6e0;
    padding: 12px 15px;
    margin-top: 12px;
    font-size: 1em;
    color: #000;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}

/* No border for first item */
.notification-item:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Hover effect */
.notification-item:hover {
    font-size: 1.05em;
    color: #007bff;
}

/* Links */
.notification-item a,
.notification-line {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

/* Wrapped text left aligned */
.notification-item a .notif-text,
.notification-line .notif-text {
    flex: 1;
    white-space: normal;
    text-align: left;
}

/* Non-clickable items */
.no-link {
    cursor: default;
    pointer-events: none;
    /* disable click */
}

/* Pause on hover */
.notifications:hover .notification-wrapper,
.notification-container:hover .notification-wrapper {
    animation-play-state: paused;
}


/* Spacer items for gap at the end before loop restarts */
.notification-item.spacer {
    border: none !important;
    padding: 12px 0;
    /* same height as normal items */
    margin: 0;
    background: transparent;
    pointer-events: none;
}

/* NEW icon */
.new-icon {
    width: 30px;
    height: auto;
    vertical-align: middle;
    animation: fadeIn 1s ease-in-out infinite alternate;
}

/* Placeholder if no icon */
.icon-placeholder {
    width: 30px;
    height: 30px;
    visibility: hidden;
}

/* Fade animation */
@keyframes fadeIn {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

/* Seamless loop (JS will duplicate the list) */
@keyframes scroll-loop {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }

    /* move by half (list + duplicate) */
}



/* Gallery Section */
.gallery {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.gallery h2 {
    font-size: 1.8em;
    margin-top: 25px;
    margin-bottom: 20px;
    color: #007bff;
    font-family: var(--font-heading);
}

.gallery-group {
    margin-bottom: 2rem;
}

.gallery-group h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ddd;
    display: inline-block;
    /* Shrink border to text width */
    padding-bottom: 0.5rem;
}

.gallery-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;

}

.gallery-item {
    position: relative;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Scale image on hover */
.gallery-item:hover a img {
    transform: scale(1.05);
    /* Adjust zoom level as needed */
    box-shadow: var(--shadow-medium);
}

/* Additional Styling for index.html's Main Gallery */
.main-gallery .gallery-item {
    width: 250px;
    /* Smaller size for index.html */
    height: 250px;
}

/* Styling for Full Gallery in gallery.html */
.full-gallery .gallery-item {
    width: 280px;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.full-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    /* object-fit: contain; */
    /* Ensure the entire image is visible within the container */
    transition: transform 0.3s ease;
}

/* Video icon overlay for gallery items */
.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Allow clicks to pass through to the parent */
}


/* Optional: Add hover effect if desired */
.full-gallery .gallery-item:hover img {
    transform: scale(1.05);
}


/* Popup Styling */
.popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Dark overlay */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1em;
    opacity: 0;
    /* Initially hidden */
    transition: opacity 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

/* Show the popup on hover */
.gallery-item:hover .popup {
    opacity: 1;
    /* Show overlay on hover */
}




.gallery-link {
    display: flex;

    justify-content: center;
    align-items: center;
    text-decoration: none;
    width: 100%;
    /* Adjust this as needed */
    height: 100%;
    /* Adjust this as needed */
}

.moore-text {
    color: var(--primary-color);
    font-size: 1.5em;
    /* Larger font for "More..." */
    font-weight: bold;
    align-self: center;
    font-family: var(--font-heading);
}

/* .gallery-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
} */

/* Special styling for the "More..." gallery box */
.gallery-item.more-box {
    border: 2px dashed var(--primary-color);
    /* dashed border highlight */
    border-radius: 12px;
    background: rgba(255, 255, 255, 255);
    /* light blue background */
    display: flex;
    /* use flexbox */
    justify-content: center;
    /* center horizontally */
    align-items: center;
    /* center vertically */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item.more-box:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.2);
    background: rgba(0, 123, 255, 0.1);
}

.more-text {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    /* extra safety */
    width: 100%;
    /* makes sure it takes full space if needed */
}



/* Display Window Style */
.display-window {
    position: relative;
    width: 700px;
    height: 500px;
    margin: 20px auto;
    text-align: center;
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.display-window img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Description Styling */
.image-description {
    width: 100%;
    /* Full width */
    height: 50px;
    /* Fixed height to avoid layout shifts */
    max-height: 50px;
    overflow: hidden;
    font-size: 1.2em;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    /* Optional padding for spacing */
    background-color: #0000;
    /* Background color for visibility */
    border-radius: 8px;
    margin-top: 10px;
}



.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
}

.left-btn {
    left: 10px;
}

.right-btn {
    right: 10px;
}



/* Footer Section */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 30px 0;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

/* Lab Logo and Tagline */
.footer-logo {
    text-decoration: none;
    /* Remove the underline */
    color: #fff;
    /* Inherit the text color from the parent */
    display: inline-block;
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 200px;
}

.footer-logo a:hover {
    text-decoration: none;
    /* Ensure no underline on hover */
    color: #fff;
    /* Maintain the original color on hover */
}

.lab-logo {
    width: 80px;
    margin-bottom: 10px;
}

.lab-tagline h3 {
    font-size: 1.2em;
    margin: 0;
}

.lab-tagline p {
    font-size: 0.9em;
    color: #ccc;
}

/* Quick Links */
.footer-links {
    text-align: left;
}

.footer-links h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #ddd;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 5px;
}

.footer-links a {
    color: #fff;
    /* Default color white */
    text-decoration: none;
}

.footer-links a:hover {
    color: #007bff;
    /* Change to blue on hover */
}

/* Contact Information */
.footer-contact h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #ddd;
}

.footer-contact p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #ccc;
}

.footer-contact a {
    color: #007bff;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* Smooth Scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}



/* Responsive Styles */
@media (max-width: 768px) {
    .research-team .professor-profile {
        max-width: 90%;
        /* Adjusted for smaller screens */
    }

    .team-container,
    .project-container {
        flex-direction: column;
        align-items: center;
    }

    .team-member,
    .professor-profile,
    .project-item {
        width: 90%;
    }

    .gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        /* Further reduced gap */
    }
}



/* Mobile Responsive Adjustments for Slideshow */
@media (max-width: 768px) {

    .slideshow-container {
        height: 300px;
        /* Shorter slideshow on mobile */
        margin: 15px auto;
    }

    .slideshow {
        display: flex;
        /* Display images in a row */
        width: 100%;
        height: 100%;
        /* Match container height */
        align-items: center;
        /* Center images vertically */
        justify-content: center;
        /* Center images horizontally */
    }

    .slide {
        display: none;
        width: 100%;
        height: 100%;
        /* Fixed height to match container */
        object-fit: cover;
        /* Compress and adjust images to fill the container */
    }

    .slide.active {
        display: block;
    }

    /* Adjust navigation buttons for mobile */
    .prev,
    .next {
        top: 45%;
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 8px;
        font-size: 14px;
    }

    .prev {
        left: 5px;
    }

    .next {
        right: 5px;
    }

    .dot-container {
        bottom: 5px;
    }

    .dot {
        height: 10px;
        width: 10px;
    }

    /* Footer Logo Adjustments for Mobile View */
    .footer-logo {
        text-decoration: none;
        /* Remove the underline */
        color: #fff;
        display: inline-block;
        /* display: flex; */
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 150px;
        /* Reduced max-width for better fit */
    }

    .lab-logo {
        width: 50px;
        /* Smaller logo size for mobile */
        margin-bottom: 8px;
        /* Slightly reduced margin */
    }

    .lab-tagline h3 {
        font-size: 1em;
        /* Adjusted font size */
        margin: 0;
    }

    .lab-tagline p {
        font-size: 0.8em;
        /* Reduced font size for better readability */
        color: #ccc;
    }

    .footer-contact h4 {
        font-size: 1em;
        margin-bottom: 1px;
        color: #ddd;
    }

    .footer-contact p {
        margin: 3px 0;
        font-size: 0.85em;
        color: #ccc;
    }

    .footer-links h4 {
        font-size: 1em;
        margin-bottom: 4px;
        color: #ddd;
    }

    .footer-links li {
        margin-bottom: 5px;
        font-size: 0.85em;
    }

    /* Display Window Adjustments for Mobile View */
    .display-window {
        width: 90%;
        /* Use most of the screen width */
        height: 250px;
        /* Fixed height for display window */
        margin: 10px auto;
        /* Adjust margins */
        padding: 5px;
        /* Adjust padding */
        border-radius: 5px;
        /* Smaller border radius */
    }

    .display-window img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        /* Ensure the image fits without cropping */
        border-radius: 5px;
        /* Match border radius */
    }

    .image-description {
        font-size: 0.85em;
        /* Adjust font size */
        padding: 2px;
        /* Reduce padding */
        height: 20px;
        /* Adjust height */
        max-height: 40px;
        margin-top: 5px;
        /* Adjust margin */
    }

    .nav-btn {
        top: 50%;
        background-color: rgba(0, 0, 0, 0.6);
        padding: 6px;
        /* Reduce button padding */
        font-size: 18px;
        /* Adjust button font size */
    }

    .left-btn {
        left: 5px;
        /* Adjust button position */
    }

    .right-btn {
        right: 5px;
        /* Adjust button position */
    }


    .gallery h2 {
        font-size: 1.2em;
        margin-top: 1px;
        margin-bottom: 2px;
        color: #007bff;
    }

    .gallery-group h3 {
        font-size: 1rem;
        color: #333;
        margin-bottom: 1rem;
        border-bottom: 2px solid #ddd;
        padding-bottom: 0.5rem;
    }

    /* Styling for Full Gallery in gallery.html */
    .full-gallery .gallery-item {
        width: 250px;
        height: 220px;
        overflow: hidden;
        border-radius: 9px;
        cursor: pointer;
    }

    /* Header Adjustments for Mobile View */
    header {
        padding: 10px 0;
        /* Reduce header padding */
    }


    .header-top {
        display: flex;
        justify-content: center;
        /* Center content horizontally */
        align-items: center;
        /* Center items vertically */
        gap: 10px;
        /* Space between logo and text */
    }

    .logo,
    .iitr-logo {
        width: 50px;
        /* Adjust logo size for mobile */
        height: auto;
    }



    .lab-name {
        font-size: 1.5em;
        /* Adjust font size for mobile */
        margin: 0 10px;
        /* Add spacing around the text */
        color: #fff;
        /* Ensure good contrast */
    }

    .header-full-form {
        font-size: 0.8em;
        /* Smaller font for the tagline */
        text-align: center;
        /* Center-align the tagline */
        padding: 5px 10px;
        /* Add padding for spacing */
    }

}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    .publication-row {
        flex-direction: column;
        /* Stack items vertically */
        align-items: center;
        /* Center align items */
    }

    .publication-item {
        width: 70%;
        /* Make publication items wider for better readability */
        height: auto;
        /* Adjust height automatically */
    }

    .publication-item img {
        height: auto;
        /* Adjust image height automatically */
        object-fit: contain;
        /* Ensure full image visibility */
    }
}


/* Smallest Mobile Devices */
@media (max-width: 480px) {
    .lab-name {
        font-size: 1.8em;
    }

    .header-full-form {
        font-size: 0.8em;
    }

    .sticky-nav .nav-links {
        width: 200px;
        /* Even narrower mobile menu */
    }

    .team-member,
    .project-item,
    .former-student,
    .publication-item {
        width: 100%;
        /* Full width on very small screens */
    }

    .gallery-item,
    .full-gallery .gallery-item {
        width: 120px;
        height: 120px;
    }

    .main-gallery .gallery-item {
        width: 150px;
        height: 150px;
    }

    .popup {
        font-size: 0.8em;
        padding: 5px;
    }
}